<!doctype html>
<html class="x-admin-sm">
<head>
    {include file="../tpl/header.html" /}
</head>
<style>
    .dt{border-top: 3px solid rgb(95,184,120);}
</style>
<body class="index">
<!-- 顶部开始 -->
<div class="container">
    <div class="logo">
        <a target="_blank" href="/">
            {:config('app.app_name')}
        </a>
    </div>
    <div class="left_open">
        <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
    </div>
    <ul class="layui-nav left fast-add" lay-filter="">
        {volist name="all_menu" id="vo"}
        <li class="layui-nav-item">
            <a {if condition="$id eq $vo['id']"}class="dt"{/if} href="{:url('admin/index/index',['id' => $vo['id']])}"><i class="iconfont" lay-tips="{$vo.name}">{$vo.icon|raw}</i> {$vo.name}</a>
        </li>
        {/volist}
    </ul>
    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;">{$user_info['role_name']}-{$user_info['name']}</a>
            <dl class="layui-nav-child">
                <!-- 二级菜单 -->
                <dd><a onclick="xadmin.open('个人信息','{:url('admin/admin/userinfo',['uid' => $user_info['uid']])}')">个人信息</a></dd>

                <dd><a href="{:url('admin/pub/logout')}">退出</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:;">主题切换</a>
            <dl class="layui-nav-child">
                {volist name="skin_list" id="v"}
                <dd><a href="{:url('admin/index/index',['skin' => $v['id']])}">{$v.name}</a></dd>
                {/volist}
            </dl>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:;">每页{$page_size}条</a>
            <dl class="layui-nav-child">
                <dd><a onclick="request_result_true('{:url('admin/index/setPageSize',['page_size' => 10])}')" href="javascript:;">10</a></dd>
                <dd><a onclick="request_result_true('{:url('admin/index/setPageSize',['page_size' => 20])}')" href="javascript:;">20</a></dd>
                <dd><a onclick="request_result_true('{:url('admin/index/setPageSize',['page_size' => 50])}')" href="javascript:;">50</a></dd>
                <dd><a onclick="request_result_true('{:url('admin/index/setPageSize',['page_size' => 100])}')" href="javascript:;">100</a></dd>
            </dl>
        </li>
    </ul>
</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            {volist name="user_menu" id="vo"}
            <li>
                <a href="javascript:;">
                    <i class="iconfont left-nav-li" lay-tips="{$vo.name}">{$vo.icon|raw}</i>
                    <cite>{$vo.name}</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu" style="max-height: 800px;overflow: auto;">
                    {php}$children = empty($vo['children']) ? [] : $vo['children'];{/php}
                    {volist name="children" id="vo1"}
                    {php}if($vo1['is_menu'] != 1){continue;}{/php}
                    <li>
                        <a title="{:url($vo1['url'])}" onclick="xadmin.add_tab('{$vo1.name}','{:url($vo1['url'])}',true)">
                            <i class="iconfont">{$vo1.icon|raw}</i>
                            <cite>{$vo1.name}</cite></a>
                    </li>
                    {/volist}
                </ul>
            </li>
            {/volist}
        </ul>
    </div>
</div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <ul class="layui-tab-title">
            <li class="home">
                <i class="layui-icon">&#xe68e;</i>
                我的桌面
            </li>
        </ul>
        <div class="layui-unselect layui-form-select layui-form-selected" id="tab_right">
            <dl>
                <dd data-type="this">关闭当前</dd>
                <dd data-type="other">关闭其它</dd>
                <dd data-type="all">关闭全部</dd>
            </dl>
        </div>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe src="{:url('admin/index/welcome')}" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
            </div>
        </div>
        <div id="tab_show"></div>
    </div>
</div>
<div class="page-content-bg"></div>
<style id="theme_style"></style>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
{include file="../tpl/footer.html" /}

<!--首页引入js,让菜单能展开-->
<script type="text/javascript" src="{$conf['static_url']}/admin/js/jquery.min.js?{$PUBCJ}"></script>
<script src="{$conf['static_url']}/admin/lib/layui/layui.js?{$PUBCJ}" charset="utf-8"></script>
<script type="text/javascript" src="{$conf['static_url']}/admin/js/xadmin.js?{$PUBCJ}"></script>
<script type="text/javascript" src="{$conf['static_url']}/admin/js/common.js?{$PUBCJ}"></script>
<script type="text/javascript" src="{$conf['static_url']}/admin/js/echarts.min.js?{$PUBCJ}"></script>
<script>
    //默认展开第一个菜单
    $(function () {
        var nav_obj = $('#nav').find('li');
        nav_obj.eq(0).addClass('open');
        nav_obj.eq(0).children('a').eq(0).addClass('active');
        nav_obj.eq(0).children('ul').eq(0).slideDown();
    });
</script>
</body>
</html>